package com.bienvenue.main.ui.activity.personal;

import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;

import com.bienvenue.main.R;
import com.bienvenue.main.adapter.ViewPagerFragmentAdapter;
import com.bienvenue.main.base.BaseActivity;
import com.bienvenue.main.ui.fragment.personal.PromptDetailsFragment;
import com.bienvenue.main.ui.fragment.personal.PromptPositionFragment;


import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * @ProjectName: Bienvenue
 * @Package: com.bienvenue.main.ui.activity
 * @ClassName: PromptDetailsActivity
 * @Description: 公司详情界面
 * @Author: Mr.Chen
 * @CreateDate: 2020/9/8 16:42
 * @UpdateUser: Mr.Chen
 * @UpdateDate: 2020/9/8 16:42
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */


public class PromptDetailsActivity  extends BaseActivity {
    @BindView(R.id.tl_prompt_details)
    TabLayout tlPromptDetails;
    @BindView(R.id.vp_page)
    ViewPager vpPage;
    List<CharSequence> listTitle=new ArrayList<>();
    List<Fragment> listFragment=new ArrayList<>();
    ViewPagerFragmentAdapter mAdapter;

    @Override
    protected void initData() {

        listTitle.add("公司介绍");
        listTitle.add("公司职位");
        listFragment.add(new PromptDetailsFragment());
        listFragment.add(new PromptPositionFragment());
        mAdapter = new ViewPagerFragmentAdapter(getSupportFragmentManager(), listFragment, listTitle);
        vpPage.setAdapter(mAdapter);
        tlPromptDetails.setupWithViewPager(vpPage);
    }

    @Override
    protected void initView() {


    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_prompt_details;
    }
    @OnClick(R.id.iv_return_btn)
    void onReturn(){
        this.finish();
    }
}
